package library.GameLoader
{
	import flash.display.DisplayObject;
	import flash.display.Loader;
	import flash.display.Sprite;

	public class MySWFLoader implements ISWFLoader
	{
		
		private var _loader:Loader = null;
		
		/**
		 * 这个loader的目的是为了兼容以前用到的SWFLoader的地方
		 */
		public function MySWFLoader(ldr:Loader)
		{
			_loader = ldr;
		}
		
		public function get rawContent():DisplayObject
		{
			return _loader.content;
		}
		
		
		public function getClass(className:String):Class
		{
			if(_loader.contentLoaderInfo.applicationDomain.hasDefinition(className))
				return _loader.contentLoaderInfo.applicationDomain.getDefinition(className) as Class;
			return null;
		}
		
	}
}